home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / sviewiv / arexx-scripts / convertanyfile.rx next >
Text File  |  1999-11-30  |  1KB  |  72 lines

  1. /*
  2.    $VER: ConvertAnyFile.rx V9.00 (15.8.99)
  3.    © 1993-99 by Andreas R. Kleinert
  4.  
  5.    This script demonstrates loading, saving (converting) and
  6.    displaying files by using SViewIV's ARexxPort.
  7.  
  8.    USAGE: RX ConvertAnyFile InFile OutFile
  9.  
  10. */
  11.  
  12. parse arg sourcefile destfile
  13.  
  14. sourcefile = strip(sourcefile)
  15. destfile = strip(destfile)
  16.  
  17. address command
  18.  
  19. SViewIV "-INSTALL_APPMENU=FALSE -INSTALL_APPICON=FALSE"
  20.  
  21. say ""
  22. say "ARexx: SViewIV has been started : Waiting a moment..."
  23.  
  24. wait 5
  25.  
  26. OPTIONS RESULTS
  27. SIGNAL ON ERROR
  28. SVIIPORT = 'SViewII.rx'
  29. SVNGPORT = 'SViewNG.rx'
  30. SVPORT   = 'SuperView.rx'
  31.  
  32. IF ~SHOW('P',SVPORT) THEN SVPORT = SVNGPORT
  33. IF ~SHOW('P',SVPORT) THEN SVPORT = SVIIPORT
  34. IF ~SHOW('P',SVPORT) THEN DO
  35.   say "Could not locate ARexx port of SViewII !"
  36.   CALL ErrorOut 0
  37. END
  38.  
  39. ADDRESS VALUE SVPORT
  40.  
  41. say "ARexx: Loading a PCX Graphics via the LOAD command"
  42. 'LOAD='||sourcefile
  43.  
  44. say "ARexx: Saving Graphics as IFF ILBM"
  45.  
  46. 'SAVE_TYPE=ILBM CmpByteRun1'
  47. 'SAVE='||destfile
  48.  
  49. address command wait 3
  50.  
  51. say "ARexx: Load this ILBM Gfx now for control"
  52.  
  53. 'SHOW='||destfile
  54.  
  55. say "ARexx: O.K. : Let's quit !"
  56.  
  57. address command Wait 2
  58.  
  59. 'QUIT'
  60.  
  61. CALL ErrorOut 0
  62.  
  63.  
  64. /* Errorout procedure ----------------------- */
  65.  
  66. ErrorOut:
  67.         PARSE ARG ExitCode
  68.  
  69.         EXIT ExitCode
  70.  
  71.   END
  72.